package com.songlanyun.modules.order.controller.api;

import com.songlanyun.common.annotation.SysLog;
import com.songlanyun.common.enums.OrderConstant;
import com.songlanyun.common.exception.RRException;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.common.validator.ValidatorUtils;
import com.songlanyun.modules.exception.OrderException;
import com.songlanyun.modules.order.entity.ChildOrder;
import com.songlanyun.modules.order.entity.Order;
import com.songlanyun.modules.order.entity.SaleServiceGoodsCard;
import com.songlanyun.modules.order.entity.SaleServiceGoodsVerificationRecord;
import com.songlanyun.modules.order.model.dto.CheckServiceGoodsDTO;
import com.songlanyun.modules.order.model.dto.RenewalServiceGoodsDTO;
import com.songlanyun.modules.order.service.OrderService;
import com.songlanyun.modules.order.service.SaleServiceGoodsCardService;
import com.songlanyun.modules.order.service.SaleServiceGoodsVerificationRecordService;
import com.songlanyun.modules.rabbitmq.mq.producer.SendOrderOrRightsOrderMsgService;
import com.songlanyun.modules.user.controller.AbstractController;
import com.songlanyun.modules.user.entity.SysUserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

//import org.apache.shiro.authz.annotation.RequiresPermissions;


/**
 * 服务商品订单核销使用记录
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2021-03-02 16:01:16
 */
@RestController
@RequestMapping("api/sgoodsverification")
public class ServiceGoodsVerificationApiController extends AbstractController {
    @Autowired
    private SaleServiceGoodsVerificationRecordService saleServiceGoodsVerificationRecordService;

    @Autowired
    private SaleServiceGoodsCardService saleServiceGoodsCardService;

    @Autowired
    private OrderService orderService;

    @Autowired
    private SendOrderOrRightsOrderMsgService sendOrderOrRightsOrderMsgService;

    /**
     * 核销记录列表
     */
    @GetMapping("/list")
    //@RequiresPermissions("order:saleservicegoodsverificationrecord:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = saleServiceGoodsVerificationRecordService.queryPage(params);

        return R.ok().put("page", page);
    }

}
